package cn.yuanqiao.web.controller.archive.Identify;/**
 * @author 赵常飞
 * @date 2023/9/18 17:59
 */
                                            /**************************
                                            * 江城子  乙卯正月二十日夜记梦 *
                                            *             宋   苏轼    *
                                            * 十年生死两茫茫,不思量,自难忘.*
                                            * 千里孤坟,无处话凄凉.        *
                                            * 纵使相逢应不识,尘满面,鬓如霜.*
                                            * 夜来幽梦忽还乡,小轩窗,正梳妆.*
                                            * 相顾无言,惟有泪千行.        *
                                            * 料得年年肠断处,明月夜,短松冈.*
                                            ***************************/

import cn.yuanqiao.archive.Identify.service.IBgqxIdentifyService;
import cn.yuanqiao.archive.Identify.service.IDisposeService;
import cn.yuanqiao.common.web.controller.BaseController;
import cn.yuanqiao.common.core.domain.AjaxResult;
import cn.yuanqiao.common.web.page.TableDataInfo;
import cn.yuanqiao.common.annotation.Log;
import cn.yuanqiao.common.enums.BusinessType;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 *
 *@AUTHOR:赵常飞
 *@date 2023/9/18 17:59
 */
@RestController
@RequestMapping("/archive/dispose")
public class DisposeController extends BaseController {
    @Autowired
    private IBgqxIdentifyService bgqxIdentifyService;
    @Autowired
    private IDisposeService disposeService;

    /**
     * 获取数据列表
     */
    @Log(title = "处置鉴定获取档案列表", businessType = BusinessType.SELECT)
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody JSONObject json)
    {
        List<Map<String,Object>> list = bgqxIdentifyService.getlist(json);
        return getDataTable(list);
    }
    /***
     * 移交/续存/销毁
     */

    @Log(title = "分配档案处置", businessType = BusinessType.UPDATE)
    @PostMapping("/fpcz")
    @PreAuthorize("@ss.hasPermi('archive:czjd:fp')")
    public AjaxResult fpcz(@RequestBody JSONObject json)
    {
        return success(disposeService.fpcz(json));
    }
}
